"""
Copyright © 2023 Walkline Wang (https://walkline.wang)
Gitee: https://gitee.com/walkline/micropython-mini-calendar
"""
__version__ = '0.1.3'
__version_info__ = (0, 1, 3)
print('module config version:', __version__)


import esp
import esp32
import ntptime

# esp.osdebug(None) # 注释此行可显示详细调试信息

# channel 0/1/None for esp32c3
esp32.RMT.bitstream_channel(0)

ntptime.host = 'ntp1.aliyun.com'
# ntptime.host = 'ntp.ntsc.ac.cn'
ntptime.timeout = 2


class Config(object):
	TIMEZONE = 8

	class BRIGHTNESS(object):
		# 根据实际情况设置亮度最大值百分比，取值范围 (1~100)
		MAX = 80


	class PINS(object):
		BRIGHTNESS_ADC = 1
		DIN_DAYS	   = 7
		DIN_WEEK_MONTH = 6


	class KEYS(object):
		KEY_1	 = 5
		KEY_2	 = 4
		KEY_BLE	 = 3
		KEY_WIFI = 2
		KEY_BOOT = 9

		KEY_LIST = (KEY_1, KEY_2, KEY_BLE, KEY_WIFI, KEY_BOOT)

		KEY_MAP = {
			KEY_1: 1,
			KEY_2: 2,
			KEY_BLE: 'BLE',
			KEY_WIFI: 'WIFI',
			KEY_BOOT: 'BOOT'
		}


	class PERIOD(object):
		ADC_MS		   = 3 * 1000 # 光敏电阻检测间隔时间
		UPDATE_DATE_MS = 5 * 1000 # 日历刷新检测间隔时间
		NTP_SYNC_MS	   = 1 * 60 * 60 * 1000 # 在线校时间隔时间


	class WS2812(object):
		DAYS_COUNT  = 57
		WEEK_COUNT  = 13
		MONTH_COUNT = 12


	class COLORS(object):
		BLACK      = (0, 0, 0)
		WHITE      = (255, 255, 255)
		DARKGRAY   = (54, 54, 54)
		SKYBLUE    = (9, 171, 255)
		LIGHTGREEN = (121, 234, 0)

		DAY         = SKYBLUE
		DAYS_BG     = (2, 2, 2)
		WEEKDAY     = LIGHTGREEN
		WEEKDAYS_BG = DARKGRAY
		MONTH       = LIGHTGREEN
